package com.shj.web.controller;

import com.shj.model.ConclusionCensus;
import com.shj.model.SubjectCensus;
import com.shj.service.SysConclusionService;
import com.shj.service.SysSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author songhuajian
 * @Description: TODO 统计
 * @date 2020/6/29 15:17
 **/
@Controller
@RequestMapping("/census")
public class CensusController {
    @Autowired
    private SysSubjectService sysSubjectService;
    @Autowired
    private SysConclusionService sysConclusionService;

    @GetMapping("/subject")
    @ResponseBody
    public SubjectCensus subjectCensus() {
        return sysSubjectService.countSubject();
    }

    @GetMapping("/conclusion")
    @ResponseBody
    public ConclusionCensus conclusionCensus() {
        return sysConclusionService.countConclusion();
    }
}
